package com.hzyl.famousreader;

import android.graphics.Color;

/**
 * 颜色主题
 */
public enum  ThemeColor {
  DEFAULT(Color.rgb(0,0,0), "默认主题"),
  THEME_01(Color.rgb(255,255,255), "经典白色"),
  THEME_02(Color.rgb(0,0,200),"蓝色"),
  THEME_03(-15132304, "午夜蓝"),
  THEME_04(-3276705, "蒲公英"),
  THEME_05(-7278960, "亮绿"),
  THEME_06(-16727446, "青绿色");


  private int color;
  private String label;

  ThemeColor(int color, String label) {
    this.color = color;
    this.label = label;
  }

  public int getColor() {
    return color;
  }

  public String getLabel() {
    return label;
  }

  //public static void main(String[] args) {
  //  System.out.println(String.format("%08x",-7876885));
  //  System.out.println(String.format("%08x",-3342336));
  //  System.out.println(String.format("%08x",-18751));
  //  System.out.println(String.format("%08x",-15132304));
  //  System.out.println(String.format("%08x",-3276705));
  //  System.out.println(String.format("%08x",-7278960));
  //  System.out.println(String.format("%08x",-16727446));
  //}

  //public static int parse(String colorString) {
  //  // Use a long to avoid rollovers on #ffXXXXXX
  //  long color = Long.parseLong(colorString.substring(1), 16);
  //  if (colorString.length() == 7) {
  //    // Set the alpha value
  //    color |= 0x00000000ff000000;
  //  } else if (colorString.length() != 9) {
  //    throw new IllegalArgumentException("Unknown color");
  //  }
  //  return (int)color;
  //}
}
